package com.tdengine.controller;


import com.tdengine.mapper.TDSupperTableMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = {"超级表管理"})
@RestController
@RequestMapping("supperTable")
public class TDSupperTableController {

    @Autowired
    TDSupperTableMapper tdSupperTableMapper;

    @ApiOperation("创建超级表")
    @GetMapping("createSupperTable")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "tableName",value = "表名"),
            @ApiImplicitParam(name = "dbName",value = "数据库名")
    })
    public String createSupperTable(@RequestParam("tableName")String tableName,@RequestParam("dbName")String dbName){
        tdSupperTableMapper.createSupperTable(tableName,dbName);
        return "成功";
    }
}
